// 我要拿的数据
var data = {
    imgUrl: "https://fms.res.meizu.com/dms/2019/02/28/dc6c4a26-479e-40ea-bde2-3c0ed2024d1c.jpg",
    infoImg: "https://img-res.mzres.com/img/download/uc/56/01/26/00/00/560126/w100h100?t=1590484309",
    name: "hooyeah",
    desc: "魅族 Note9 邀请函 JK 服妹子出镜，谁才是最美游戏姬？",
    tip: "热卖"
}

/*
    imgUrl:     .commun-img的img的src
    infoImg:    .commun-info的img的src
    name:       span.commun-info-name的内容
    desc:       p.commun-desc的内容
    tip:        span.commun-tip的内容
*/


// 批量拿数据
var arr = [];
var lis = $0.querySelectorAll("li");
for (var i = 0; i < lis.length; i++) {
    var o1 = {}
    var li = lis[i];
    o1.imgUrl = li.querySelector(".comment-img-wp img").src;
    o1.infoImg = li.querySelector('.comment-user-info img').src;
    o1.name = li.querySelector('span.comment-username').innerText;
    o1.desc = li.querySelector('.box-img p').innerText;
    o1.tip = li.querySelector('span.comment-tip').innerText;
    // console.log(o1);
    arr.push(o1);
}
// // console.log(arr);
var jsonStr = JSON.stringify(arr);
console.log(jsonStr);